package edu.seu.mart.model;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import edu.seu.mart.utils.MsgKit;

/**
 * 消息基类
 */
public class BaseMsg {
    /**
     * ToUserName 开发者微信号
     * FromUserName 发送方账号（一个OpenID）
     * CreateTime 消息创建时间（整型）
     * MsgType 消息类型（text/image/location/link/voice/music/event）
     */
    @XStreamAlias("ToUserName")
    protected String toUserName;
    @XStreamAlias("FromUserName")
    protected String fromUserName;
    @XStreamAlias("CreateTime")
    protected long createTime;
    @XStreamAlias("MsgType")
    protected String msgType;

    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = MsgKit.addCData(toUserName);
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = MsgKit.addCData(fromUserName);
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = MsgKit.addCData(msgType);
    }
}
